package com.beemans.common.app.data.repository

import com.beemans.common.app.data.api.Apis
import com.tiamosu.fly.http.FlyHttp
import com.tiamosu.fly.http.callback.Callback

/**
 * @author tiamosu
 * @date 2021/5/28.
 */
class DataRepository : IRemoteRequest {

    companion object {
        val instance by lazy { DataRepository() }
    }

    override fun <T> getFriend(callback: Callback<T>) {
        FlyHttp[Apis.FRIEND_JSON]
            .build()
            .execute(callback)
    }

    override fun <T> postFriend(callback: Callback<T>) {
        FlyHttp.post(Apis.FRIEND_JSON)
            .build()
            .execute(callback)
    }
}